home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
gnu
/
libg_261.zip
/
libg_261
/
libg++
/
tests
/
tLList.exp
< prev
next >
Wrap
Text File
|
1992-05-06
|
1KB
|
50 lines
prepending...
a: 9 8 7 6 5 4 3 2 1 0
appending...
a: 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9
b = a:
9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9
remove_front of first 10 elements:
b: 0 1 2 3 4 5 6 7 8 9
inserting 100 after sixth element...
b: 0 1 2 3 4 5 100 6 7 8 9
after a.join(b)
9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 100 6 7 8 9
b:
b:
999
bb:
999
prepending...
a:
9 8 7 6 5 4 3 2 1 0
appending...
a: 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9
b = a: 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9
remove_front of first 10 elements:
b: 0 1 2 3 4 5 6 7 8 9
inserting 100 after sixth element...
b: 0 1 2 3 4 5 100 6 7 8 9
after aa = a; aa.join(b)
9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 100 6 7 8 9
b:
b:
999
bb:
999
z = a: 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9
remove_rear of last 10 elements:
z: 9 8 7 6 5 4 3 2 1 0
inserting 100 before alternate elements...
z: 100 9 100 8 100 7 100 6 100 5 100 4 100 3 100 2 100 1 100 0
inserting 200 after sixth element...
z: 100 9 100 8 100 7 200 100 6 100 5 100 4 100 3 100 2 100 1 100 0
deleting alternate elements of z...100 100 100 200 6 5 4 3 2 1 0
z: 9 8 7 100 100 100 100 100 100 100
z in reverse order:
100 100 100 100 100 100 100 7 8 9
End of test